{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "/home/yoyee/Documents/deepSfm\n"
     ]
    }
   ],
   "source": [
    "import os\n",
    "import sys\n",
    "import numpy as np\n",
    "import subprocess\n",
    "subprocess.run([\"ls\", \"-l\"])\n",
    "\n",
    "module_path = os.path.abspath(os.path.join('..'))\n",
    "if module_path not in sys.path:\n",
    "    sys.path.append(module_path)\n",
    "os.chdir('..')\n",
    "print(os.getcwd())\n",
    "\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/yoyee/.local/lib/python3.6/site-packages/ipykernel_launcher.py:3: UserWarning: loadtxt: Empty input file: \"logs/magicpoint_synth20_homoAdapt100_kitti/predictions/val.txt\"\n",
      "  This is separate from the ipykernel package so we can avoid doing imports until\n",
      "/home/yoyee/.local/lib/python3.6/site-packages/ipykernel_launcher.py:4: UserWarning: loadtxt: Empty input file: \"logs/magicpoint_synth20_homoAdapt100_kitti/predictions/val.txt\"\n",
      "  after removing the cwd from sys.path.\n"
     ]
    }
   ],
   "source": [
    "folder = 'logs/magicpoint_synth20_homoAdapt100_kitti/predictions'\n",
    "file = 'val.txt'\n",
    "val = np.loadtxt(folder + '/' + file)\n",
    "val = np.loadtxt(folder + '/' + file)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([], dtype=float64)"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "val"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "py36_pytorch",
   "language": "python",
   "name": "py36_pytorch"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.7"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
